//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_STL_Core.h".
//-------------------------------------------------------------------

#ifdef __UX_STL_UNIT_TEST__

//#define PLATFORM_SDL
#include "../ux_stl_core.h"

using namespace UX_STL;
using namespace UXTypes;


void Test_CompileTime_TypeList ()
{
	typedef CompileTime::TypeList20< uint8, int16, uint, int64, float, half_t, double >::type		typeList0;
	STATIC_ASSERTE( typeList0::Length::value == 7 );

	typedef typeList0::PushBack< int >::type	typeList1;
	STATIC_ASSERTE( typeList1::Length::value == 8 );
	STATIC_ASSERTE( TypeDescriptor::IsSameTypes< typeList1::Back::type, int >::value );

	typedef typeList1::PushFront< float8u_t >::type		typeList2;
	STATIC_ASSERTE( typeList2::Length::value == 9 );
	STATIC_ASSERTE( TypeDescriptor::IsSameTypes< typeList2::Front::type, float8u_t >::value );

	typedef typeList2::PopBack::type	typeList3;
	STATIC_ASSERTE( typeList3::Length::value == 8 );
	STATIC_ASSERTE( TypeDescriptor::IsSameTypes< typeList3::Back::type, double >::value );

	typedef typeList3::PopFront::type	typeList4;
	STATIC_ASSERTE( typeList4::Length::value == 7 );
	STATIC_ASSERTE( typeList4::Equal< typeList0 >::value );
}

#endif	// __UX_STL_UNIT_TEST__